import { axios } from '@/utils/request'

export function selectPage(parameter) {
  return axios({
    url: '/pc/merchant/selectPage/' + parameter.pageNum + "/" + parameter.pageSize,
    method: 'post',
    data: parameter
  })
}

export function save(parameter) {
  return axios({
    url: '/pc/merchant/save',
    method: 'post',
    data: parameter
  })
}

export function del(parameter) {
  return axios({
    url: '/pc/merchant/delete/' + parameter,
    method: 'get'
  })
}

export function selectAllMerchant(parameter) {
  return axios({
    url: '/pc/merchant/selectAll?companyId=' + parameter,
    method: 'get'
  })
}


export function deleteBatch(parameter) {
  return axios({
    url: '/pc/merchant/deleteBatch',
    method: 'post',
    data:{
      'merchants':parameter
    }
  })
}

export function confirm(parameter) {
  return axios({
    url: '/pc/merchant/confirm',
    method: 'post',
    data: parameter
  })
}
